package zhongbo.java.air.monitor.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.*;
import org.springframework.data.domain.Pageable;
import zhongbo.java.air.monitor.model.AirAlertZone;

import java.util.List;

/**
 * 警戒区域配置表(AirAlertZone)表数据库访问层
 *
 * @author makejava
 * @since 2025-03-31 14:06:00
 */
@Mapper
public interface AirAlertZoneMapper extends BaseMapper<AirAlertZone> {

    /**
     * 查询指定行数据
     *
     * @param offset 偏移量
     * @param pageSize         大小
     * @return 对象列表
     */
    @Select("SELECT * FROM air_alert_zone ORDER BY id LIMIT #{pageSize} OFFSET #{offset}")
    List<AirAlertZone> queryAllByLimit(@Param("offset") int offset, @Param("pageSize") int pageSize);
    //获取zone_code
    @Select("SELECT zone_code FROM air_alert_zone WHERE zone_code = #{zoneCode}")
    AirAlertZone selectByZoneCode(@Param("zoneCode") String zoneCode);


}

